- libusb-dev
- docbook-xml
- docbook-xsl
+before_script:
+# get locale needed for test_encoding.
+# these commands seem to work on xenial
+# - sudo sed -i 's/^# *\(en_US ISO-8859-1\)/\1/' /etc/locale.gen
+# - sudo dpkg-reconfigure --frontend=noninteractive locales
+# but on trusty it took something different, including eating an error from local-gen.
+ - sudo locale-gen en_US ISO-8859-1 || sudo locale-gen
+ - locale -a
script:
- ./build_and_test
# TODO: build mac
--- /dev/null
+#!/bin/bash
+# this file should be encoded in latin1
+
+BASEPATH=`dirname $0`
+PNAME=${PNAME:-${BASEPATH}/gpsbabel}
+REFERENCE=${BASEPATH}/reference
+
+TMPDIR=${GBTEMP:-/tmp}/gpsbabel.$$
+mkdir -p $TMPDIR
+trap "rm -fr $TMPDIR" 0 1 2 3 15
+
+errorcount=0
+
+if locale -a | grep -q en_US.iso88591 ; then
+ export LC_ALL=en_US.iso88591
+ rm -f ${TMPDIR}/file*.kml
+ rm -f ${TMPDIR}/file*.gpx
+
+# test input file name mangling
+ cp ${REFERENCE}/bounds-test.gpx ${TMPDIR}/file¢.gpx
+ ${PNAME} -i gpx -f ${TMPDIR}/file¢.gpx -o kml -F ${TMPDIR}/fileo.kml || {
+ echo "ERROR: The input file name was mangled."
+ errorcount=`expr $errorcount + 1`
+ }
+
+# test output file name mangling
+ ${PNAME} -i gpx -f ${REFERENCE}/bounds-test.gpx -o kml -F ${TMPDIR}/file¢.kml
+ count=$(ls -1 -l ${TMPDIR}/file¢.kml | wc -l)
+ if [ $count -lt 1 ]; then
+ echo "ERROR: The output file name was mangled."
+ errorcount=`expr $errorcount + 1`
+ fi
+else
+ echo "$0 cannot run without the en_US.iso88591 locale."
+fi
+
+exit $errorcount